from django.contrib import admin
from django.urls import path, re_path
from django.views.static import serve
from myapp.views import myindex, pay_url
from myapp.md_user import Register, ding_url, UploadFile, websocketlink, sendmessage, GetOnLines, TestThread, Myc, \
    testlock
# from myapp.edu_user import Registers, Login
from myapp.edu_user import  Login

from django.contrib.staticfiles.urls import staticfiles_urlpatterns

# ... the rest of your URLconf goes here ...
urlpatterns = [
    # 定义超链接路由
    # re_path('^static/upload/(?P<path>.*)$',serve,{'document_root':'/static/upload/'}),
    path('', myindex),
    path('testlock/', testlock),
    path('dingding_url/', ding_url),
    path('register/', Register.as_view()),
    path('upload/', UploadFile.as_view()),
    path('websocketlink/', websocketlink),
    path('sendmessage/', sendmessage),
    path('getonlines/', GetOnLines.as_view()),
    path('testthread/', TestThread),
    path('code/', Myc.as_view()),
    # path('registers/', Registers.as_view()),
    path('login/', Login.as_view())

]

urlpatterns += staticfiles_urlpatterns()
